import axios from 'axios';

let localHost = 'https://api.douban.com';
let bookHost = 'https://ibook-test.ichangtou.com';
let hzHost = 'http://116.62.67.174:10009';

export const getBook1 = params => {
  return axios.get(`${localHost}/v2/book/1220561`)
}
// 书单
export const getBook = params => {
  return axios.get(`${bookHost}/book/${params}`)
}
// 评论
export const getComment = (params, paramsS) => {
  return axios.get(`${bookHost}/booknote/${params}/${paramsS}`)
}

// ranks Type 为 1 显示 连续达标接口
// ranks Type 为 0 显示 管理规模
// PC
export const postRanksA = params => {
  return axios.post(`${hzHost}/stock/httpServiceImpl/doStock`, params)
}
// h5
export const postRanksB = (params, params2) => {
  // console.log('JSON.parse', JSON.stringify(params));
  params.header.page.index = params2
  console.log('params.header.page.index', params.header.page.index);

  console.log('hahaha', params2);
  return axios.post(`${hzHost}/stock/httpServiceImpl/doStock`, params)
}
